package com.tool_stdy.concurrent;

import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by yan_li on 2017/2/8.
 */
public class ConcurrentHashmapTest {
    public static void main(String[] args) {
        ConcurrentHashMap map = new ConcurrentHashMap();
        map.put("1", 1);
        System.out.println(map.putIfAbsent("2",2));
        System.out.println(map.get("2"));
    }
}
